net: Remove variables hooks when interface is unregisted
authorB Horn <b@horn.uk>
Fri, 1 Nov 2024 23:49:48 +0000 (23:49 +0000)
committerFelix Zielcke <fzielcke@z-51.de>
Thu, 3 Jul 2025 16:35:51 +0000 (18:35 +0200)
commitccc6db2618e9772bbf2f703dcbcd4ca9e957cac0
tree8bd19a857cdd081a8d7a3db8412e2ef65cebcb35
parentb8183d7bb2ca9126eed161dea2bb40b8887ef737
net: Remove variables hooks when interface is unregisted

The grub_net_network_level_interface_unregister(), previously
implemented in a header, did not remove the variables hooks that
were registered in grub_net_network_level_interface_register().
Fix this by implementing the same logic used to register the
variables and move the function into the grub-core/net/net.c.

Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Conflicts:
grub-core/net/net.c

Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name net-Remove-variables-hooks-when-interface-is-unregisted.patch
grub-core/net/net.c
include/grub/net.h